const mongoose = require('mongoose')
const Schema = mongoose.Schema
const Mixed = Schema.Types.Mixed
const ObjectId = Schema.Types.ObjectId

const lessonSchema = new mongoose.Schema({
  title: { type: String },
  description: { type: String },
  type: { type: String, enum: ['video', 'text'] },
  videlUrl: { type: String },
  minute: { type: Number },
  suggestHours: { type: Number },
  text: { type: String },
  course_id: { type: ObjectId, required: true }
})

mongoose.model('Lesson', lessonSchema)
